package com.lovo.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lovo.system.dto.PurchaseDetailsDto;
import com.lovo.system.mapper.PurchaseDetailsMapper;
import com.lovo.system.service.IPurchaseDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PurchaseDetailsServiceImpl extends ServiceImpl<PurchaseDetailsMapper, PurchaseDetailsDto> implements IPurchaseDetailsService {

    @Autowired
    PurchaseDetailsMapper purchaseDetailsMapper;

    @Override
    public List<PurchaseDetailsDto> info(int fkId) {
        return purchaseDetailsMapper.info(fkId);
    }

    @Override
    public void insertPurchaseDetails(PurchaseDetailsDto purchaseDetailsDto) {
        purchaseDetailsMapper.insert(purchaseDetailsDto);
    }
}
